package com.xt.purchasingsystem.mapper;


import com.xt.purchasingsystem.model.MProcedureModule;
import com.xt.purchasingsystem.vo.MProcedureModuleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MProcedureModuleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MProcedureModule record);

    int insertSelective(MProcedureModule record);

    MProcedureModule selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MProcedureModule record);

    int updateByPrimaryKey(MProcedureModule record);

    /**
     * 出库调度时查询
     * @param manufactureId 派工单编号
     * @param procedureName 工序名称
     * @param productId 产品编号
     * @return
     */
    MProcedureModule getMProcedureModuleByDeliverySchedule(@Param("manufactureId") String manufactureId,@Param("procedureName") String procedureName,@Param("productId") String productId);

    /**
     * 根据生产工序编号查询此工序的所有物料
     * @param parentId
     * @return
     */
    List<MProcedureModule> getAllByParentId(Integer parentId);

    List<MProcedureModuleVo> getAllVoByParentId(Integer parentId);
}